﻿using Back_end.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Back_end.APIModels
{
	// AccountController 操作返回的模型。

	public class ExternalLoginViewModel
	{
		public string Name
		{ get; set; }

		public string Url
		{ get; set; }

		public string State
		{ get; set; }
	}

	public class ManageInfoViewModel
	{
		public string LocalLoginProvider
		{ get; set; }

		public string Email
		{ get; set; }

		public IEnumerable<UserLoginInfoViewModel> Logins
		{ get; set; }

		public IEnumerable<ExternalLoginViewModel> ExternalLoginProviders
		{ get; set; }
	}

	public class UserDetailInfoModel
	{
		public string Id
		{ get; set; }

		[Display(Name = "用户名")]
		public string UserName
		{ get; set; }

		[Display(Name = "电子邮件")]
		[EmailAddress]
		public string Email
		{ get; set; }

		[Display(Name = "实名认证状态")]
		public bool HadAuthentication
		{ get; set; }

		[Display(Name = "真实姓名")]
		public string RealName
		{ get; set; }

		[Display(Name = "性别")]
		public string Gender
		{ get; set; }

		[Display(Name = "所在地")]
		public string Location
		{ get; set; }

		public string AvatarPath
		{ get; set; }

		[Display(Name = "总共积分")]
		public double TotleCredit
		{ get; set; }

		[Display(Name = "可用积分")]
		public double Credit
		{ get; set; }

		[Display(Name = "最后举报日期")]
		public DateTime RegisterDate
		{ get; set; }

		[Display(Name = "最后举报日期")]
		public DateTime? LastestDate
		{ get; set; }

		public List<Complaint> Complaints
		{ get; set; }

		//public List<string> Followed
		//{ get; set; }

		//public List<string> Likes
		//{ get; set; }
	}

	public class UserInfoModel
	{
		public string Id
		{ get; set; }

		[Display(Name = "用户名")]
		public string UserName
		{ get; set; }

		[Display(Name = "电子邮件")]
		[EmailAddress]
		public string Email
		{ get; set; }

		[Display(Name = "性别")]
		public string Gender
		{ get; set; }

		[Display(Name = "所在地")]
		public string Location
		{ get; set; }

		[Display(Name = "头像")]
		public string AvatarPath
		{ get; set; }

		[Display(Name = "总共积分")]
		public double TotleCredit
		{ get; set; }

		[Display(Name = "可用积分")]
		public double Credit
		{ get; set; }
	}

	public class UserLoginInfoViewModel
	{
		public string LoginProvider
		{ get; set; }

		public string ProviderKey
		{ get; set; }
	}
}